{extend name="public/base" /}
{block name="head"}
    <meta charset="UTF-8">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link href="/resource/ui-framework/easyui-1.5.2/themes/metro/easyui-c5a176a3d4.css" rel="stylesheet" />
    <link href="/resource/ui-framework/easyui-1.5.2/themes/icon-77a4ded0c8.css" rel="stylesheet" />

    <link href="/resource/ui-framework/bootstrap/3.0.3/css/bootstrap-a067b6d831.min.css" rel="stylesheet" />
    <link href="/resource/ui-framework/bootstrap-daterangepicker/css/daterangepicker-886dba62c4.css" rel="stylesheet" />
    <link href="/resource/ui-framework/font-awesome/css/font-awesome-a81d284b37.css" rel="stylesheet" />

    <link href="/resource/ui-framework/admin-lte/css/AdminLET-7d58b99a7e.css" rel="stylesheet" />
    <link href="/static/css/base-dc47892812.css" rel="stylesheet" />

    <link href="/resource/ui-framework/jason/searchbox/css/searchbox-398327fb84.css" rel="stylesheet" />
    <link href="/resource/ui-framework/jason/pager/css/pager-f077f5e880.css" rel="stylesheet" />
    <link href="/resource/ui-framework/jason/status/css/status-5f59ab3856.css" rel="stylesheet" />
    <link href="/resource/ui-framework/jason/selector/css/selector-23060c280e.css" rel="stylesheet" />
    <link href="/resource/ui-framework/jason/button/css/button-5ef10c798a.css" rel="stylesheet" />
    <link href="/resource/ui-framework/jason/orderarrow/css/orderarrow-dcf8eba7d1.css" rel="stylesheet" />

    <link href="/static/css/table-0e491bc98f.css" rel="stylesheet" />
    <link href="/static/css/easyui-ext-372f902530.css" rel="stylesheet" />
{/block}
{block name="content"}
        <section class="content">


            <div class="container" style="width:100%">
                <div class="row">
                    <ul>
                        <li class="fl h31 ml10">日期范围：</li>
                        <li class="ml10 fl">
                            <input type="text" class="form-control" id="dateRange" style="width:200px">
                        </li>
                        <!--<li class="fl h31 ml10">日期范围：</li>
                        <li class="ml10 fl" style="width:200px;">
                            <input type="text" class="form-control" id="qDate" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
                        </li>-->
                        <li class="ml10 fl">
                            <a href="#" class="btn-action fl" id="btnSearch">查询</a>
                        </li>
                    </ul>
                </div>
                <div class="row mt10">
                    <div id="msgChart" data-highcharts-chart="0"><div class="highcharts-container" id="highcharts-0" style="position: relative; overflow: hidden; width: 1383px; height: 400px; text-align: left; line-height: normal; z-index: 0; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"><svg version="1.1" style="font-family:&quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, Arial, Helvetica, sans-serif;font-size:12px;" xmlns="http://www.w3.org/2000/svg" width="1383" height="400"><desc>Created with Highcharts 4.2.1</desc><defs><clipPath id="highcharts-1"><rect x="0" y="0" width="1338" height="291"></rect></clipPath></defs><rect x="0" y="0" width="1383" height="400" strokeWidth="0" fill="#FFFFFF" class=" highcharts-background"></rect><g class="highcharts-grid" zIndex="1"></g><g class="highcharts-grid" zIndex="1"></g><g class="highcharts-axis" zIndex="2"><path fill="none" d="M 35 344.5 L 1373 344.5" stroke="#C0D0E0" stroke-width="1" zIndex="7"></path></g><g class="highcharts-axis" zIndex="2"><text x="25" zIndex="7" text-anchor="middle" transform="translate(0,0) rotate(270 25 198.5)" class=" highcharts-yaxis-title" style="color:#707070;fill:#707070;" y="198.5">短信条数</text></g><g class="highcharts-series-group" zIndex="3"><g class="highcharts-series highcharts-series-0" zIndex="0.1" transform="translate(35,53) scale(1 1)" clip-path="url(#highcharts-1)"><path fill="none" d="M 0 0" stroke-linejoin="round" visibility="visible" stroke="rgba(192,192,192,0.0001)" stroke-width="22" zIndex="2" class=" highcharts-tracker" style=""></path></g><g class="highcharts-markers highcharts-series-0 highcharts-tracker" zIndex="0.1" transform="translate(35,53) scale(1 1)" clip-path="url(#highcharts-2)" style=""></g></g><text x="692" text-anchor="middle" class="highcharts-title" zIndex="4" style="color:#333333;font-size:18px;fill:#333333;width:1319px;" y="24">每日短信量</text><g class="highcharts-legend" zIndex="7" transform="translate(648,356)"><g zIndex="1"><g><g class="highcharts-legend-item" zIndex="1" transform="translate(8,3)"><path fill="none" d="M 0 11 L 16 11" stroke="#7cb5ec" stroke-width="2"></path><path fill="#7cb5ec" d="M 8 7 C 13.328 7 13.328 15 8 15 C 2.6719999999999997 15 2.6719999999999997 7 8 7 Z"></path><text x="21" style="color:#333333;font-size:12px;font-weight:bold;cursor:pointer;fill:#333333;" text-anchor="start" zIndex="2" y="15">短信条数</text></g></g></g></g><g class="highcharts-axis-labels highcharts-xaxis-labels" zIndex="7"></g><g class="highcharts-axis-labels highcharts-yaxis-labels" zIndex="7"></g><g class="highcharts-tooltip" zIndex="8" style="cursor:default;padding:0;pointer-events:none;white-space:nowrap;" transform="translate(0,-9999)"><path fill="none" d="M 3.5 0.5 L 13.5 0.5 C 16.5 0.5 16.5 0.5 16.5 3.5 L 16.5 13.5 C 16.5 16.5 16.5 16.5 13.5 16.5 L 3.5 16.5 C 0.5 16.5 0.5 16.5 0.5 13.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5" isShadow="true" stroke="black" stroke-opacity="0.049999999999999996" stroke-width="5" transform="translate(1, 1)"></path><path fill="none" d="M 3.5 0.5 L 13.5 0.5 C 16.5 0.5 16.5 0.5 16.5 3.5 L 16.5 13.5 C 16.5 16.5 16.5 16.5 13.5 16.5 L 3.5 16.5 C 0.5 16.5 0.5 16.5 0.5 13.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5" isShadow="true" stroke="black" stroke-opacity="0.09999999999999999" stroke-width="3" transform="translate(1, 1)"></path><path fill="none" d="M 3.5 0.5 L 13.5 0.5 C 16.5 0.5 16.5 0.5 16.5 3.5 L 16.5 13.5 C 16.5 16.5 16.5 16.5 13.5 16.5 L 3.5 16.5 C 0.5 16.5 0.5 16.5 0.5 13.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5" isShadow="true" stroke="black" stroke-opacity="0.15" stroke-width="1" transform="translate(1, 1)"></path><path fill="rgba(249, 249, 249, .85)" d="M 3.5 0.5 L 13.5 0.5 C 16.5 0.5 16.5 0.5 16.5 3.5 L 16.5 13.5 C 16.5 16.5 16.5 16.5 13.5 16.5 L 3.5 16.5 C 0.5 16.5 0.5 16.5 0.5 13.5 L 0.5 3.5 C 0.5 0.5 0.5 0.5 3.5 0.5"></path></g><text x="1373" text-anchor="end" zIndex="8" style="cursor:pointer;color:#909090;font-size:9px;fill:#909090;" y="395">Highcharts.com</text></svg><div class="highcharts-tooltip" style="position: absolute; left: 0px; top: -9999px;"><span style="position: absolute; font-family: &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, Arial, Helvetica, sans-serif; font-size: 12px; white-space: nowrap; color: rgb(51, 51, 51); margin-left: 0px; margin-top: 0px; left: 8px; top: 8px;" zindex="1"></span></div></div></div>
                </div>
                <div class="row">
                    <table class="order mt10" style="width:450px;">
                        <tbody><tr class="header">
                            <td>#</td>
                            <td>日期</td>
                            <td>发送次数</td>
                            <td>计费条数</td>
                        </tr>
                        </tbody><tbody id="mySms"></tbody>
                        <tfoot>
                        <tr class="footer">
                            <td></td>
                            <td>合计</td>
                            <td>
                                <div id="total">0</div>
                            </td>
                            <td>
                                <div id="feeTotal">0</div>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>

            <script type="text/html" id="temp">
                {{each DayStat as item index}}
                <tr class="project">
                    <td>{{index+1}}</td>
                    <td>{{item.CDate}}</td>
                    <td>
                        <a href="/Report/MsgDetails/{{item.CDate}}" target="_blank">{{item.MsgCount}}</a>
                    </td>
                    <td>{{item.FeeCount}}</td>
                </tr>
                {{/each}}
            </script>


        </section>
{/block}
{block name="script"}
<script src="/resource/libs/jquery/jquery.js"></script>
<script src="/static/js/layer/layer.js"></script>
<script src="/resource/libs/ajaxfileupload-20caa375ef.js"></script>
<script src="/resource/ui-framework/bootstrap/3.0.3/js/bootstrap-7b3098bda9.min.js"></script>
<script src="/resource/ui-framework/bootstrap-daterangepicker/js/moment-zh_cn-3d8809ccd6.js"></script>
<script src="/resource/ui-framework/bootstrap-daterangepicker/js/daterangepicker-bca1a72d19.js"></script>
<script src="/resource/ui-framework/admin-lte/app-bf15eda982.js"></script>

<script src="/resource/ui-framework/easyui-1.5.2/jquery-623c7c7acd.easyui.min.js"></script>
<script src="/resource/ui-framework/easyui/plugins/jquery-1db0d9c758.checkbox.js"></script>
<script src="/resource/ui-framework/jason/searchbox/searchbox-3fc48f72fe.js"></script>
<script src="/resource/ui-framework/jason/pager/pager-0646a093e8.js"></script>
<script src="/resource/ui-framework/jason/status/sky-2d329149af.tools.status.js"></script>
<script src="/resource/ui-framework/jason/screenshot-paste-0b91b6bd4a.js"></script>
<script src="/resource/ui-framework/jason/selector/selector-a0b18d2070.js"></script>
<script src="/resource/ui-framework/jason/button/button-71f76513c7.js"></script>
<script src="/resource/ui-framework/jason/orderarrow/orderarrow-1bbd8bcec2.js"></script>
<script src="/resource/libs/clipboard-892cfb62e7.min.js"></script>
<script src="/resource/libs/template-2d62718262.js"></script>
<script src="/resource/libs/jquery-d833fe9e58.cookie.js"></script>
<script src="/resource/libs/common-21f077db5b.js"></script>
<script src="/resource/libs/tools-4754a28493.js"></script>
<script src="/resource/libs/basePage-d30d50f2ce.js"></script>
<script type="text/javascript">
$().ready(function () {
    var url = $('#hdnURL').val();
    $('.sidebar .treeview').each(function (index, item) {
        var btn = $(this).children("a").first();
        var menu = $(this).children(".treeview-menu").first();
        $(this).find('a').each(function (index, item) {
            if ($(item).attr('href') == url) {
                menu.show();
                btn.children(".fa-angle-left").first().removeClass("fa-angle-left").addClass("fa-angle-down");
            }
        });
    });
});
var today = '<?php echo date("Y/m/d"); ?>,<?php echo date("Y/m/d",time()+24*3600); ?>';
var yesterday = '<?php echo date("Y/m/d",time()-24*3600); ?>,<?php echo date("Y/m/d"); ?>';
var sevenday = '<?php echo date("Y/m/d",time()-7*24*3600); ?>,<?php echo date("Y/m/d"); ?>';
var thirtyday = '<?php echo date("Y/m/d",time()-30*24*3600); ?>,<?php echo date("Y/m/d"); ?>';
var rangeCurrentMonth = '<?php echo date("Y/m/01"); ?>,<?php echo date("Y/m/d"); ?>';
$("#dateRange").daterangepicker(
    {
    showDropdowns:!0,
    timePicker:!0,
    timePicker24Hour:!0,
    timePickerIncrement:5,
    autoApply:!0,
    startDate:$("#startDate").val(),
    endDate:$("#endDate").val(),
    ranges:
    {
    "今天":today.split(","),
    "昨天":yesterday.split(","),
    "最近7天":sevenday.split(","),
    "最近30天":thirtyday.split(","),
    "本月":rangeCurrentMonth.split(",")
    },
    locale:
    {
    direction:"ltr",
    format:"YYYY/MM/DD HH:mm",
    separator:" - ",
    applyLabel:"确定",
    cancelLabel:"取消",
    fromLabel:"From",
    toLabel:"To",
    customRangeLabel:"自定义",
    daysOfWeek:["日","一","二","三","四","五","六"],
    monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
    firstDay:1
    },
    linkedCalendars:!1,
    alwaysShowCalendars:!1,
    opens:"right"
    },function(e,t,i){
        
    });
var date = "<?php if(isset($_GET['date'])){ echo $_GET['date']; } ?>";
if(date){
    $("#dateRange").val(date);
}
function btnSearch(){
    var date = $("#dateRange").val();
    var iphone = $("input[name=iphone]").val();
    var taobao = $("input[name=taobao]").val();
    var qq = $("input[name=qq]").val();
    window.location.href = '/index/census/customer?date='+date+'&iphone='+iphone+'&taobao='+taobao+'&qq='+qq;
}
</script>
{/block}  